-- GENERATED SPELL FOR [Dragonflayer Tribesman] --


function spell0_23651(pUnit, Event) --@Charge,n/a--
pUnit:FullCastSpellOnTarget(35570,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23651', 2312, 1)
end

function spell1_23651(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(15496,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23651', 597, 1)
end

function spell2_23651(pUnit, Event) --@Enrage,Self--
pUnit:FullCastSpellOnTarget(48193,pUnit)
pUnit:RegisterEvent('Sorts_23651', 10299, 1)
end

function Sorts_23651(pUnit, Event)
local choix_sorts_23651 = math.random(0, 2)
if choix_sorts_23651 == 0 then
pUnit:RegisterEvent('spell0_23651', 1, 1)
end
if choix_sorts_23651 == 1 then
pUnit:RegisterEvent('spell1_23651', 1, 1)
end
if choix_sorts_23651 == 2 then
pUnit:RegisterEvent('spell2_23651', 1, 1)
end
end

function mob23651_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_23651', math.random(1500, 3000), 1)
end

function mob23651_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23651_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23651_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(23651, 1, 'mob23651_Action')
RegisterUnitEvent(23651, 2, 'mob23651_Leave')
RegisterUnitEvent(23651, 3, 'mob23651_Kill')
RegisterUnitEvent(23651, 4, 'mob23651_Die')
